home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / mac / DirectX SDK / DXSDK / bin / DXUtils / dmotest.chm / style.js < prev    next >
Text File  |  2001-10-08  |  1KB  |  39 lines

  1.    if(typeof(sRelPath) == "undefined")
  2.     alert('\n\n\nMessage generated by style.js script module.\n\n\nUnable to determine "sRelPath" (Relative Path) for this documentation project.\n\n\n');
  3.  
  4.    if(typeof(g_isIE) == "undefined")
  5.     alert('\n\n\nMessage generated by style.js script module.\n\n\n"ver.js" browser detection script module not present in current document. This will cause CSS formatted HTML elements to be improperly displayed on this page.\n\n\n');
  6.  
  7.    var sCSS = '<LINK REL="stylesheet" HREF="' + sRelPath + "css/";
  8.  
  9.    if(g_isIE)
  10.    {
  11.        if (g_iMaj >= 4) // For MSIE 4.0 or later
  12.        {
  13.            if (g_sPlat == "Win") // Windows only for now
  14.            {
  15.             document.createStyleSheet(sRelPath + 'css/IE4.css');
  16.            }
  17.            else{
  18.             sCSS += 'IE4';
  19.                sCSS += (sCSS == '' ? '' : '.css" TYPE="text/css">');
  20.                document.write(sCSS);
  21.             }
  22.        }
  23.        else // For MSIE 3.0 or earlier
  24.        {
  25.            sCSS += 'IE3';
  26.            sCSS += (sCSS == '' ? '' : '.css" TYPE="text/css">');
  27.            document.write(sCSS);
  28.        }
  29.    }
  30.    else if (g_isNav) // For all Nav versions
  31.    {
  32.        // do nothing;
  33.    }
  34.    else
  35.    {
  36.        sCSS += 'IE3'; // default to IE3 sheet
  37.        sCSS += (sCSS == '' ? '' : '.css" TYPE="text/css">');
  38.        document.write(sCSS);
  39.    }